﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;

namespace SLIP.Shells
{
    /// <summary>
    /// Basic Shell with Left Menu Region built-in
    /// </summary>
    public partial class SLIPLeftMenuShell : UserControl
    {
        int orbHeight = 32;
        int orbWidth = 32;

        public SLIPLeftMenuShell()
        {
            InitializeComponent();
        }

        private void menuOrb_MouseLeftButtonUp(object sender, MouseEventArgs e)
        {
            puMenu.IsOpen = !puMenu.IsOpen;
            if (!puMenu.IsOpen)
            {
                menuOrb.Height = orbHeight / 2;
                menuOrb.Width = orbWidth / 2;
            }
        }

        private void menuOrb__MouseEnter(object sender, MouseEventArgs e)
        {
            menuOrb.Height = orbHeight;
            menuOrb.Width = orbWidth;
        }
        private void menuOrb_MouseLeave(object sender, MouseEventArgs e)
        {
            if (!puMenu.IsOpen)
            {
                menuOrb.Height = orbHeight / 2;
                menuOrb.Width = orbWidth / 2;
            }
        }

    }
}
